package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type MilkCouponRouter struct {
}

// InitMilkCouponRouter 初始化 MilkCoupon 路由信息
func (s *MilkCouponRouter) InitMilkCouponRouter(Router *gin.RouterGroup) {
	milkCouponRouter := Router.Group("milkCoupon").Use(middleware.OperationRecord())
	milkCouponRouterWithoutRecord := Router.Group("milkCoupon")
	var milkCouponApi = v1.ApiGroupApp.AutoCodeApiGroup.MilkCouponApi
	{
		milkCouponRouter.POST("createMilkCoupon", milkCouponApi.CreateMilkCoupon)   // 新建MilkCoupon
		milkCouponRouter.DELETE("deleteMilkCoupon", milkCouponApi.DeleteMilkCoupon) // 删除MilkCoupon
		milkCouponRouter.DELETE("deleteMilkCouponByIds", milkCouponApi.DeleteMilkCouponByIds) // 批量删除MilkCoupon
		milkCouponRouter.PUT("updateMilkCoupon", milkCouponApi.UpdateMilkCoupon)    // 更新MilkCoupon
	}
	{
		milkCouponRouterWithoutRecord.GET("findMilkCoupon", milkCouponApi.FindMilkCoupon)        // 根据ID获取MilkCoupon
		milkCouponRouterWithoutRecord.GET("getMilkCouponList", milkCouponApi.GetMilkCouponList)  // 获取MilkCoupon列表
	}
}
